Integrand size = 23, antiderivative size = 152 \[ \int \frac {\cot ^3(c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {2 \text {arctanh}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d}+\frac {9 \text {arctanh}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{8 \sqrt {2} \sqrt {a} d}-\frac {a}{12 d (a+a \sec (c+d x))^{3/2}}+\frac {a}{2 d (1-\sec (c+d x)) (a+a \sec (c+d x))^{3/2}}+\frac {7}{8 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3965, 105, 157, 162, 65, 213} \[ \int \frac {\cot ^3(c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {2 \text {arctanh}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {a}}\right )}{\sqrt {a} d}+\frac {9 \text {arctanh}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {2} \sqrt {a}}\right )}{8 \sqrt {2} \sqrt {a} d}-\frac {a}{12 d (a \sec (c+d x)+a)^{3/2}}+\frac {a}{2 d (1-\sec (c+d x)) (a \sec (c+d x)+a)^{3/2}}+\frac {7}{8 d \sqrt {a \sec (c+d x)+a}} \]
[In]
[Out]
Rule 65
Rule 105
Rule 157
Rule 162
Rule 213
Rule 3965
Rubi steps \begin{align*} \text {integral}& = \frac {a^4 \text {Subst}\left (\int \frac {1}{x (-a+a x)^2 (a+a x)^{5/2}} \, dx,x,\sec (c+d x)\right )}{d} \\ & = \frac {a}{2 d (1-\sec (c+d x)) (a+a \sec (c+d x))^{3/2}}-\frac {a \text {Subst}\left (\int \frac {2 a^2+\frac {5 a^2 x}{2}}{x (-a+a x) (a+a x)^{5/2}} \, dx,x,\sec (c+d x)\right )}{2 d} \\ & = -\frac {a}{12 d (a+a \sec (c+d x))^{3/2}}+\frac {a}{2 d (1-\sec (c+d x)) (a+a \sec (c+d x))^{3/2}}+\frac {\text {Subst}\left (\int \frac {-6 a^4-\frac {3 a^4 x}{4}}{x (-a+a x) (a+a x)^{3/2}} \, dx,x,\sec (c+d x)\right )}{6 a^2 d} \\ & = -\frac {a}{12 d (a+a \sec (c+d x))^{3/2}}+\frac {a}{2 d (1-\sec (c+d x)) (a+a \sec (c+d x))^{3/2}}+\frac {7}{8 d \sqrt {a+a \sec (c+d x)}}-\frac {\text {Subst}\left (\int \frac {6 a^6-\frac {21 a^6 x}{8}}{x (-a+a x) \sqrt {a+a x}} \, dx,x,\sec (c+d x)\right )}{6 a^5 d} \\ & = -\frac {a}{12 d (a+a \sec (c+d x))^{3/2}}+\frac {a}{2 d (1-\sec (c+d x)) (a+a \sec (c+d x))^{3/2}}+\frac {7}{8 d \sqrt {a+a \sec (c+d x)}}+\frac {\text {Subst}\left (\int \frac {1}{x \sqrt {a+a x}} \, dx,x,\sec (c+d x)\right )}{d}-\frac {(9 a) \text {Subst}\left (\int \frac {1}{(-a+a x) \sqrt {a+a x}} \, dx,x,\sec (c+d x)\right )}{16 d} \\ & = -\frac {a}{12 d (a+a \sec (c+d x))^{3/2}}+\frac {a}{2 d (1-\sec (c+d x)) (a+a \sec (c+d x))^{3/2}}+\frac {7}{8 d \sqrt {a+a \sec (c+d x)}}-\frac {9 \text {Subst}\left (\int \frac {1}{-2 a+x^2} \, dx,x,\sqrt {a+a \sec (c+d x)}\right )}{8 d}+\frac {2 \text {Subst}\left (\int \frac {1}{-1+\frac {x^2}{a}} \, dx,x,\sqrt {a+a \sec (c+d x)}\right )}{a d} \\ & = -\frac {2 \text {arctanh}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d}+\frac {9 \text {arctanh}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{8 \sqrt {2} \sqrt {a} d}-\frac {a}{12 d (a+a \sec (c+d x))^{3/2}}+\frac {a}{2 d (1-\sec (c+d x)) (a+a \sec (c+d x))^{3/2}}+\frac {7}{8 d \sqrt {a+a \sec (c+d x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.16 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.59 \[ \int \frac {\cot ^3(c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {a \left (-6-9 \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},\frac {1}{2} (1+\sec (c+d x))\right ) (-1+\sec (c+d x))+8 \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},1+\sec (c+d x)\right ) (-1+\sec (c+d x))\right )}{12 d (-1+\sec (c+d x)) (a (1+\sec (c+d x)))^{3/2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(271\) vs. \(2(123)=246\).
Time = 1.75 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.79
method | result | size |
default | \(\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (27 \arctan \left (\frac {\sqrt {2}}{2 \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right ) \cos \left (d x +c \right ) \sqrt {2}\, \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+27 \sqrt {2}\, \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \arctan \left (\frac {\sqrt {2}}{2 \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right )+96 \arctan \left (\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\right ) \cos \left (d x +c \right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+96 \arctan \left (\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}-62 \cos \left (d x +c \right ) \cot \left (d x +c \right )^{2}-4 \cot \left (d x +c \right )^{2}+42 \cot \left (d x +c \right ) \csc \left (d x +c \right )\right )}{48 d a \left (\cos \left (d x +c \right )+1\right )}\) | \(272\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 260 vs. \(2 (121) = 242\).
Time = 0.35 (sec) , antiderivative size = 546, normalized size of antiderivative = 3.59 \[ \int \frac {\cot ^3(c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\left [\frac {27 \, \sqrt {2} {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) - 1\right )} \sqrt {a} \log \left (\frac {2 \, \sqrt {2} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right ) - 1}\right ) + 48 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) - 1\right )} \sqrt {a} \log \left (-8 \, a \cos \left (d x + c\right )^{2} + 4 \, {\left (2 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} - 8 \, a \cos \left (d x + c\right ) - a\right ) + 4 \, {\left (31 \, \cos \left (d x + c\right )^{3} + 2 \, \cos \left (d x + c\right )^{2} - 21 \, \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}}}{96 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2} - a d \cos \left (d x + c\right ) - a d\right )}}, -\frac {27 \, \sqrt {2} {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) - 1\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{a \cos \left (d x + c\right ) + a}\right ) - 48 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) - 1\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{2 \, a \cos \left (d x + c\right ) + a}\right ) - 2 \, {\left (31 \, \cos \left (d x + c\right )^{3} + 2 \, \cos \left (d x + c\right )^{2} - 21 \, \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}}}{48 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2} - a d \cos \left (d x + c\right ) - a d\right )}}\right ] \]
[In]
[Out]
\[ \int \frac {\cot ^3(c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\cot ^{3}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
[In]
[Out]
\[ \int \frac {\cot ^3(c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )^{3}}{\sqrt {a \sec \left (d x + c\right ) + a}} \,d x } \]
[In]
[Out]
none
Time = 0.84 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.14 \[ \int \frac {\cot ^3(c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {2} {\left (\frac {48 \, \sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a}} - \frac {27 \, \arctan \left (\frac {\sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} - \frac {3 \, \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} + \frac {2 \, {\left ({\left (-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a\right )}^{\frac {3}{2}} a^{4} + 12 \, \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} a^{5}\right )}}{a^{6}}\right )}}{48 \, d \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} \]
[In]
[Out]
Timed out. \[ \int \frac {\cot ^3(c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {{\mathrm {cot}\left (c+d\,x\right )}^3}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]
[In]
[Out]